\documentclass{article}
\usepackage{fixltx2e}
\usepackage{pdfpages}

\usepackage{amsmath}
\usepackage{framed}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{stackrel}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}

\pagestyle{empty}

\begin{document}

\begin{framed}
\textbf{The modified Mixcoin protocol}\\
\footnotesize

\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
        rectangle,
        rounded corners,
        draw=black, very thick,
        text width=11em,
        minimum height=2em,
        text centered},
        %Define style for thin boxes
        thinpunkt/.style={
            rectangle,
            rounded corners,
            draw=black, very thick,
            text width=9em,
            minimum height=2em,
            text centered},
            %Define style for wide boxes
            widepunkt/.style={
                rectangle,
                rounded corners,
                draw=black, very thick,
                text width=13em,
                minimum height=2em,
                text centered},
                %Define style for wider boxes
                widerpunkt/.style={
                    rectangle,
                    rounded corners,
                    draw=black, very thick,
                    text width=15em,
                    minimum height=2em,
                    text centered},
                    %Define style for widest boxes
                    widestpunkt/.style={
                        rectangle,
                        rounded corners,
                        draw=black, very thick,
                        text width=20em,
                        minimum height=2em,
                        text centered},
                        % Define arrow style
                        pil/.style={
                            <-,
                            thick,
                            shorten <=2pt,
                            shorten >=2pt,}
}

\newcommand{\chunksize}{v}
\newcommand{\inputdeadline}{t_1}
\newcommand{\outputdeadline}{t_2}
\newcommand{\deadlinea}{t_3}
\newcommand{\deadlineb}{t_4}
\newcommand{\confirmationdelay}{\omega}
\newcommand{\inputaddress}{k_{in}}
\newcommand{\outputaddress}{k_{out}}
\newcommand{\feerate}{\rho}
\newcommand{\crsnonce}{n}
\newcommand{\nonce}{N}
\newcommand{\crsrandfunc}{\textbf{Beacon}}
\newcommand{\escrowaddress}{k_{esc}}
\newcommand{\escrowaddressprime}{k_{esc}'}

\begin{tikzpicture}[node distance=1cm, auto,]
%nodes
\node[widestpunkt] (start) {1) $A \stackrel{\text{anon}}{\longrightarrow} M$:\\
$\langle D =~(\chunksize, \inputdeadline, \outputdeadline, \deadlinea, \deadlineb, \confirmationdelay, \feerate), [\outputaddress, \crsnonce, \nonce]_{C_A} \rangle$};
\node[below=1.5cm of start] (dummy1) {};

\node[widepunkt, inner sep=5pt,left=0.5cm of dummy1]
(sign) {2a) $A \stackrel{\text{anon}}{\longleftarrow} M$: $\left\{[\outputaddress, \crsnonce, N]_{C_A}, \escrowaddress \right\}_{K_{M}}$}
edge[pil,bend left=45] node[auto, align=center] {$M$ accepts terms,\\ specifies $\escrowaddress$} (start.west);

\node[below=1.5cm of start] (dummy1a) {};

\node[thinpunkt, inner sep=5pt,right=1cm of dummy1a]
(reject) {2b) $A \stackrel{\text{anon}}{\longleftarrow} M$: \\ $\perp$}
edge[pil,bend right=45] node[auto] {$M$ rejects terms} (start.east);

\node[below=0.5cm of reject]
(burnkey) {$A$ destroys $\outputaddress$}
edge[pil,] (reject.south);

\node[below=2.5cm of dummy1] (dummy2) {};

\node[punkt, inner sep=5pt,left=1cm of dummy2]
(transfer) {3) $A$ (by time $\inputdeadline$): \\ $\textbf{Transfer}\left(\chunksize, \inputaddress, \escrowaddress \right)$}
edge[pil,] node[auto, align=center] {$A$ pays on time \\ (from any address)} (sign.south);

\node[above right =0.7cm of dummy2]
(forget) {$M$ aborts protocol}
edge[pil] node[auto] {$A$ doesn't pay} (sign.south east);

\node[below=8cm of dummy2] (dummy3) {};



%% New parts of protocol

\node[punkt, inner sep=5pt, below=1cm of transfer] (broadcast) {4a) $M \longrightarrow public\ log$: $\left[[\outputaddress, \crsnonce, N]_{C_A} \right]_{K_{M}}$}
edge[pil,] node[auto, align=center] {$M$ broadcasts\\(by time $t_2$)} (transfer.south);
\node[widerpunkt, inner sep=5pt, above right=1cm of broadcast, yshift=-1cm]
(apub1) {4b)$A$ publicizes: $\left[D, [\outputaddress, \crsnonce, N]_{C_A} \right]_{K_M}$}
edge[pil] node[above right] {$M$ doesn't broadcast} (transfer.east);



\node[punkt, inner sep=5pt, below=1.3cm of broadcast] (unblind) {5) $A' \stackrel{\text{anon}}{\longrightarrow} public\ log$: $\langle \outputaddress, \crsnonce, [\outputaddress, \crsnonce, N]_{K_M} \rangle$}
edge[pil,] node[auto, align=center] {$A'$ unblinds output\\address (by time $\deadlinea$\\anonymously)} (broadcast.south);
\node[above right=1cm of unblind, yshift=-1cm]
(retainorreturn) {$M$ retains or returns funds}
edge[pil] node[above right] {$A'$ doesn't unblind} (broadcast.east);

%% End new parts of protocol




\node[below=0.5cm of unblind]
(draw_random){$X = \crsrandfunc(\deadlinea, \confirmationdelay, \crsnonce)$}
edge[pil,] (unblind.south);

\node[below=0.7cm of draw_random] (dummy3a) {}
edge[pil,] node[auto] {$X > \feerate$} (draw_random.south);

\node[right=2cm of draw_random] (transacion) {$M$ retains funds}
edge[pil,] node[auto] {$X \le \feerate$} (draw_random.east);

\node[punkt, inner sep=5pt,left=1cm of dummy3]
(transfer2) {6a) $M$: (by time $\deadlineb$) \\ $\textbf{Transfer}\left(\chunksize, \escrowaddressprime, \outputaddress\right)$}
edge[pil,] node[auto] {$M$ acts honestly} (dummy3a.south);

\node[punkt, inner sep=5pt,right=0.3cm of dummy3]
(steal) {6b) No \mbox{transfer} to $\outputaddress$ by time $\deadlineb$}
edge[pil] node[above right] {$M$ steals funds} (dummy3a.south east);

\node[below=2.5cm of dummy3] (dummy4) {};

\node[left=1cm of dummy4]
(finalize) {$A, M$ destroy records}
edge[pil,] node[auto] {Protocol successful} (transfer2.south);


%% A publicizes the incriminating evidence (our modification)

\node[widepunkt, inner sep=5pt,right=0.0cm of dummy4]
(denounce) {7) $A$ publicizes incrimintating evidence. See Protocol, section 7}
edge[pil] node[auto] {$A$ detects theft (after $\deadlineb$)} (steal.south);

\end{tikzpicture}

\normalsize 
\end{framed}

\end{document}
